/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package cn.stylefeng.guns.modular.oss.cloud;


import cn.stylefeng.guns.base.consts.ConstantsContext;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import java.io.Serializable;

/**
 * 云存储配置信息
 *
 * @author Mark sunlightcs@gmail.com
 */
@Data
public class CloudStorageConfig implements Serializable {
    private static final long serialVersionUID = 1L;

    //类型 0：本地 1：七牛  2：阿里云  3：腾讯云 4：华为云
    @Range(min=0, max=4, message = "类型错误")
    private Integer type=Integer.parseInt((String) ConstantsContext.getConstntsMap().get("oss_current_selected"));

    //七牛ACCESS_KEY
    private String qiniuAccessKey=(String) ConstantsContext.getConstntsMap().get("oss_qiniuAccessKey");
    //七牛SECRET_KEY
    private String qiniuSecretKey=(String) ConstantsContext.getConstntsMap().get("oss_qiniuSecretKey");
    //七牛存储空间名
    private String qiniuBucketName=(String) ConstantsContext.getConstntsMap().get("oss_qiniuBucketName");
    //七牛路径前缀
    private String qiniuPrefix=(String) ConstantsContext.getConstntsMap().get("oss_qiniuPrefix");
    //七牛绑定的域名
    private String qiniuDomain=(String) ConstantsContext.getConstntsMap().get("oss_qiniuDomain");

    //阿里云AccessKeyId
    private String aliyunAccessKeyId=(String) ConstantsContext.getConstntsMap().get("oss_aliyunAccessKeyId");
    //阿里云AccessKeySecret
    private String aliyunAccessKeySecret=(String) ConstantsContext.getConstntsMap().get("oss_aliyunAccessKeySecret");
    //阿里云BucketName
    private String aliyunBucketName=(String) ConstantsContext.getConstntsMap().get("oss_aliyunBucketName");
    //阿里云路径前缀
    private String aliyunPrefix=(String) ConstantsContext.getConstntsMap().get("oss_aliyunPrefix");
    //阿里云绑定的域名
    private String aliyunDomain=(String) ConstantsContext.getConstntsMap().get("oss_aliyunDomain");
    //阿里云EndPoint
    private String aliyunEndPoint=(String) ConstantsContext.getConstntsMap().get("oss_aliyunEndPoint");

    //腾讯云AppId
    private Integer qcloudAppId=Integer.parseInt((String) ConstantsContext.getConstntsMap().get("oss_qcloudAppId"));
    //腾讯云SecretId
    private String qcloudSecretId=(String) ConstantsContext.getConstntsMap().get("oss_qcloudSecretId");
    //腾讯云SecretKey
    private String qcloudSecretKey=(String) ConstantsContext.getConstntsMap().get("oss_qcloudSecretKey");
    //腾讯云BucketName
    private String qcloudBucketName=(String) ConstantsContext.getConstntsMap().get("oss_qcloudBucketName");
    //腾讯云COS所属地区
    private String qcloudRegion=(String) ConstantsContext.getConstntsMap().get("oss_qcloudRegion");
    //腾讯云绑定的域名
    private String qcloudDomain=(String) ConstantsContext.getConstntsMap().get("oss_qcloudDomain");
    //腾讯云路径前缀
    private String qcloudPrefix=(String) ConstantsContext.getConstntsMap().get("oss_qcloudPrefix");

    //华为云AccessKeyId
    private String huaweiAccessKeyId=(String) ConstantsContext.getConstntsMap().get("oss_huaweiAccessKeyId");
    //华为云AccessKeySecret
    private String huaweiAccessKeySecret=(String) ConstantsContext.getConstntsMap().get("oss_huaweiAccessKeySecret");
    //华为云BucketName
    private String huaweiBucketName=(String) ConstantsContext.getConstntsMap().get("oss_huaweiBucketName");
    //华为云路径前缀
    private String huaweiPrefix=(String) ConstantsContext.getConstntsMap().get("oss_huaweiPrefix");
    //华为云绑定的域名
    private String huaweiDomain=(String) ConstantsContext.getConstntsMap().get("oss_huaweiDomain");
    //华为云EndPoint
    private String huaweiEndPoint=(String) ConstantsContext.getConstntsMap().get("oss_huaweiEndPoint");

}
